package com.quicks.beauty.core.dao;

import com.quicks.beauty.core.entity.UserInvite;
import com.quicks.beauty.core.entity.UserOrder;
import com.quicks.beauty.core.vo.InviteUserVO;
import com.quicks.beauty.core.vo.ProdSubMinMax;
import com.quicks.beauty.core.vo.ProductSub;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface CustomMapper {

    List<InviteUserVO> getUserInvited(@Param("userId") String userId);


    ProdSubMinMax findProdSubMinMaxPrice(@Param("productId") String productId,@Param("states") int states);

    List<ProductSub> findProdSubs(@Param("productId") String productId,@Param("states") int states);

    ProductSub findSubDetail(@Param("productId")String subId);

    int findOrderNum(@Param("invitedUserId")String invitedUserId);

    Map<String,Object> getBillAmount(String invitedUserId);

    String getOrderId(@Param("userId")String userId);

    UserOrder getOrderDetail(@Param("userId")String userId);

    void expirePoints(@Param("userId")String userId,@Param("orderId") String orderId);

    void updateOrder(@Param("orderId")String orderId,@Param("date")Date date);



    int getPoints(@Param("orderId")String orderId);

    void expirePointsDetail(@Param("id")String id, @Param("userId")String userId, @Param("orderId")String orderId,@Param("date") Date date, @Param("points")int points,@Param("oldPoints")int oldPoints);

    UserOrder getOrder(@Param("orderCode")String orderCode);

    void updateTradeState(@Param("orderId")String id, @Param("tradeState")int i);

    UserOrder getOrderById(@Param("orderId")String orderId);

    Integer getOrderStates(@Param("orderId")String id);

    int getUserPoints(@Param("userId")String userId);

    String getUserInvite(@Param("userId")String userId);

    int findOrderPay(@Param("userId")String userId);
}
